package com.xx.happychatboot.middleware.netty.domain.vo.response;

import com.xx.happychatboot.base.vo.response.ResponseDate;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class WebSocketResponse<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 类型
     */
    private Integer type;

    /**
     * 数据
     */
    private T data;

    public WebSocketResponse(Integer type) {
        this.type = type;
    }

    public static WebSocketResponse callBackType(Integer type) {
        return new WebSocketResponse(type);
    }
}
